<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Document</title><link rel="stylesheet" href="../font2/iconfont.css"><link rel="stylesheet" href="../css/index.css"><link rel="stylesheet" href="../css/gouwuche.css"></head><body><!-- 顶端 --><div class="all"><div class="nav"><section><span><a href="./denglu.html">登入</a></span> 或 <span><a href="./zhuce.html">注册</a></span> <span><a href="">ANTA会员</a></span></section><section><a href="./guowuche.html"><span class="iconfont icon-gouwuche"></span></a> <span class="iconfont icon-kefu"></span> <span>EN</span></section></div><!-- 导航 --><div class="daohang"><a href="./anta.html"><img src="../img/anta_02.jpg" alt=""></a><ul><li><a href="./shangpin.html">冬奥国旗款</a></li><li class="left1"><a href="">男子</a><!-- <ul>
                        <li>
                            <div class="leftt">
                                <section>
                                    <ul>
                                        <li class="big">所有鞋类</li>
                                        <li>运动鞋</li>
                                        <li>跑鞋</li>
                                        <li>篮球鞋</li>
                                        <li>休闲鞋</li>
                                        <li>板鞋</li>
                                        <li>户外综训鞋</li>
                                    </ul>
                                </section>
                                <section>
                                    <ul>
                        </li>
                        <li class="big">套头卫衣</li>
                        <li>外套夹克</li>
                        <li>羽绒服/马甲</li>
                        <li>短袖T恤</li>
                        <li>长裤</li>
                        <li>运动短裤</li>
                    </ul>
                    </section>
                    <section>
                        <ul>
                            <li class="big">所有配件</li>
                            <li>包类</li>
                            <li>运动袜子</li>
                        </ul>
                    </section>
                    <section>
                        <ul>
                            <li class="big">运动项目</li>
                            <li>跑步</li>
                            <li>篮球</li>
                            <li>综训</li>
                            <li>生活</li>
                            <li>健身</li>
                        </ul>
                    </section>
        </div>
        </li>
        </ul>
        </li> --></li><li class="center1"><a href="">女子</a><!-- <div class="center">
                <section>
                    <ul>
                        <li class="big">所有鞋类</li>
                        <li>运动鞋</li>
                        <li>跑鞋</li>
                        <li>篮球鞋</li>
                        <li>休闲鞋</li>
                        <li>板鞋</li>
                        <li>户外综训鞋</li>
                    </ul>
                </section>
                <section>
                    <ul>
        </li>
        <li class="big">套头卫衣</li>
        <li>外套夹克</li>
        <li>羽绒服/马甲</li>
        <li>短袖T恤</li>
        <li>长裤</li>
        <li>运动短裤</li>
        </ul>
        </section>
        <section>
            <ul>
                <li class="big">所有配件</li>
                <li>包类</li>
                <li>运动袜子</li>
            </ul>
        </section>
        </li> --></li><li class="right1"><a href="">儿童</a><!-- <div class="rightt">
                <section>
                    <ul>
                        <li class="big">所有鞋类</li>
                        <li>运动鞋</li>
                        <li>跑鞋</li>
                        <li>篮球鞋</li>
                        <li>休闲鞋</li>
                        <li>板鞋</li>
                        <li>户外综训鞋</li>
                    </ul>
                </section>
                <section>
                    <ul>
        </li>
        <li class="big">套头卫衣</li>
        <li>外套夹克</li>
        <li>羽绒服/马甲</li>
        <li>袖T恤</li>
        <li>长裤</li>
        <li>运动短裤</li>
        </ul>
        </section> --></li><li><a href="">安踏儿童</a></li><li><a href="">品牌文化</a></li><li><a href="">观赏视频</a></li><li><a href="">联系我们</a></li></ul><section class="sousuo"><span class="iconfont icon-Magnifier"></span> <input type="text" placeholder="  搜索"></section></div><!-- 内容 --><div class="tishi"><h2>您还没有登入</h2><p>立即去&nbsp;<a href="./denglu.html">登录</a>&nbsp;或者&nbsp;<a href="./zhuce.html">注册</a>&nbsp;安踏会员</p></div><!-- 小隔条 --><div class="getiao"></div><h1 class="wenzi">我的购物车&nbsp;&nbsp;</h1><div id="zong"><!-- <div class="shangpin">
            <div class="tupian">
             <img src="../img/17.jpg" alt="">
            </div>
     
            <div class="xinxi">
             <p>男短袖针织衫</p>
             数量：<button class="minusnum">-</button>
             <input type="text" class="count" size="6" value="1">
             <button class="addnum">+</button>
            </div>
     
            <div class="shanchu">
             <p class="xj">399.00</p>
             <button class="delnum">删除</button>
            </div>
         </div> --></div><!-- <div class="house">
    <h4 class="iconfont icon-gouwuche" id="konggouwuche"></h4>
    <p class="tiaoxuan">您的购物车中没有任何商品，马上去 <a href="./shangpin.html">挑选商品</a></p>
   </div> --><!-- 返回顶部 --><div class="dingbu"><section id="app"><span class="iconfont icon-fanhuidingbu"></span><p><a href="#">返回顶部</a></p></section><section><span class="iconfont icon-gouwuche"></span><p><a href="./guowuche.html">购物车</a></p></section><section><span class="iconfont icon-kefu"></span><p><a href="#">客服</a></p></section></div><!-- 导航内容 --></div><!-- 尾页 --><div class="weiye"><span><img src="../img/anta_06.jpg" alt=""></span><section class="boss"><div class="big"><section>在线客服<span class="iconfont icon-kefu"></span></section></div><div class="two"><section>在线资讯<span>440-858-2020</span></section></div><p><img src="../img/com-qr-code.jpg" alt=""></p></section><div class="last"><span>Copyright(C)2012-2020 &nbsp;by&nbsp; www.ANTA.cn&nbsp;&nbsp; C安踏体育用品有限公司版权所有&nbsp;&nbsp; 营业执照&nbsp;&nbsp; 开户许可证个人信息保护政策</span><p>闽ICP备2021011550号-2闽公网安备35020302033806号</p></div></div><!-- 固定结算 --><div class="jiesuan"><div class="one"><input type="checkbox" id="dianji"><span>全选商品<a href="#">删除商品</a></span></div><section><h1>总价</h1><p>￥0.00</p></section><section class="two"><a href="#">结算</a></section></div></body></html><script src="../jquery/jquery.js"></script><script src="../jquery/jquery.min.js"></script><script src="../img/php/js/cookieTools.js"></script><script>$(window).on("scroll", function () {
        if ($(window).scrollTop() > 250) {
            $("#app").fadeIn(1000)
        } else {
            $("#app").fadeOut(1000)
        }
    })

    $("#app").on("click", function () {
        $("html,body").animate({  // 让body和html回到顶部
            scrollTop: 0
        }, 1000)
    })</script><!-- + -->
    <script>$(".addnum").click(function(){
    var index=$(".addnum").index(this)
    var $input=$(".count").eq(index)
    var num=$input.val()
    $input.val(++num)

    var price=$(".xj").eq(index).text()
    $("").eq(index).text(num*price)
    
  })</script>
  <script>$(function(){
        getShoppingCart();
        // deleteGoods();
    })
    function  getShoppingCart(){
        $.get('../img/php/getShoppingCart.php',{"vipName":(getCookie("username"))},function(data){
            console.log(data);
            let arr=JSON.parse(data);
            let str='';
            arr.forEach((item,index)=>{
                str+=`<div class="shangpin">
            <div class="tupian">
             <img src="${item.goodsImg}" alt="">
            </div>
     
            <div class="xinxi">
             <p>${item.goodsDesc}</p>
             <span id="moon">${item.goodsId}</span>
             数量：<button class="minusnum">-</button>
             <input type="text" class="count" size="6" value="${item.goodsCount}">
             <button class="addnum">+</button>
            </div>
     
            <div class="shanchu">
             <p class="xj">${item.goodsPrice}</p>
             <button class="delnum">删除</button>
            </div>
         </div>`
            })
            $('#zong').html(str)
        })
    }


    // $(".delnum").on("click",function(){
    //     $.get("../img/php/deleteGoods.php",{"vipName":(getCookie("username")),"goodsId":$("#moon").val()},function(data){
    //         console.log(data);
    //         // if(data.trim()=="1"){
    //         //     alert("删除成功")
    //         // }else{
    //         //     alert("删除失败")
    //         // }
    //     })
    // })</script>